package cn.three.daoImpl;

import org.apache.ibatis.session.SqlSession;

import cn.three.eneity.User;
import cn.three.factory_dao.SqlSessionFactoryUtil;
import cn.three.factory_dao.userdao;

public class userDaoImpl implements userdao {

	@Override
	public User userlogin(User user) {
		SqlSession se = null;
		User u=null;
		
		try {
			se = SqlSessionFactoryUtil.getSqlSession();
			userdao dao = se.getMapper(userdao.class);		
			
			 u = dao.userlogin(user);
			
		} catch (Exception e) {
		e.printStackTrace();
		}finally{
			if(se!=null)se.close();
		}
		
		
		return u;
       

	}

}
